package com.inspur_video.inspur_video.bean.video;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-07-28 16:00
 * @package com.inspur_video.inspur_video.bean
 * @description 视频实体类(持久化)
 *
 * 注意：播放地址,带时效的播放URL（30分钟），不持久化
 *
 */
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Data
@Table(name = "videos")
public class Video {
    /**
     * 视频id
     */
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "v_id")
    private int vId;
    /**
     * 标题
     */
    @Column(name = "v_title")
    private String vTitle;
    /**
     * 阿里云视频id
     */
    @Column(name = "a_id")
    private String aId;
    /**
     * 视频分类（两类：0电影；1电视剧）
     */
    @Column(name = "v_category")
    private int vCategory;
    /**
     * 集数
     */
    @Column(name = "v_number")
    private int vNumber;
    /**
     * 总集数
     */
    @Column(name = "v_total")
    private int vTotal;
    /**
     * 是否会员与非会员(0非会员，1会员)
     */
    @Column(name = "v_permission")
    private int vPermission;
    /**
     * 视频标签
     */
    @Column(name = "v_tag")
    private String vTag;
    /**
     * 视频描述
     */
    @Lob
    @Column(name = "v_describe")
    private String vDescribe;

    /**
     * 封面图片
     */
    @Column(name = "cover_url")
    private String coverURL;
    /**
     * 视频播放地址
     */
    @Lob
    @Column(name = "v_url")
    private String  vURL;
}